import { network } from '@/utils';
import { AddOrEditParams } from './data';

import { business } from '../../../../../config/Apis';

export async function queryChargeWhiteList(params: any) {
    return network.get(business.pickUpFree_list, { params });
}

export async function opertionChangeStatus(params: any) {
    return network.put(business.pickUpFree_status, { data: params });
}

export async function queryChargeWhiteDetail(params: { id: number }) {
    return network.get(business.pickUpFree, { params });
}

export async function opertionChargeWhiteInfo(params: AddOrEditParams) {
    return params.id
        ? network.put(business.pickUpFree, { data: params })
        : network.post(business.pickUpFree, { data: params });
}

export async function opertionChargeBatchWhiteInfo(params: { ids: string, startTime: string, endTime: string, status: string }) {
    return network.put(business.batchUpdate, { data: params })
}
